<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
                xmlns:shiro="http://www.thymeleaf.org/thymeleaf-extras-shiro">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        body{
            background-color: #8EC5FC;
            background-image: linear-gradient(62deg, #8EC5FC 0%, #E0C3FC 100%);
        }
    </style>
</head>
<body>
<h1>首页</h1>
   <p>这里是主页</p>
<!--从session中拿到当前用户的登录信息-->
   <div th:if="${session.userSession==null}">
       <a th:href="@{/ToLogin}">登录</a>
   </div>
   <span >
<!--    根据用户权限显示对应页面   -->
       <div shiro:hasPermission="user:add">
           <a th:href="@{/user/add}">添加用户</a>
       </div>
       <div shiro:hasPermission="user:delete">
           <a th:href="@{/user/delete}">删除用户</a>
       </div>
   </span>
</body>
</html>